﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TwelveYearCycleOfAnimalAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.TwelveYearCycleOfAnimalAdmin" %>
<owc:OwGrid ID="TwelveYearCycleOfAnimalGrid" runat="server" DataSourceID="TwelveYearCycleOfAnimalOds"
    SkinID="OwGridAdmin">
    <MasterTableView DataSourceID="TwelveYearCycleOfAnimalOds" DataKeyNames="TwelveYearCycleOfAnimalID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="TwelveYearCycleOfAnimalID" FilterControlAltText="Filter Name TwelveYearCycleOfAnimalID"
                HeaderText='<%$ OwR: Code %>' SortExpression="TwelveYearCycleOfAnimalID" UniqueName="TwelveYearCycleOfAnimalID">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText="<%$OwR:Title %>"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="CountryLabel" />
                            </td>
                            <td>
                                <%#OwLocalitiesBLL.OwGetEntity((long?)Eval("CountryID")).Name%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="LanguageCode" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Name" />
                            </td>
                            <td>
                                <%# Eval("Name")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText="<%$OwR:ThumbImage %>"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <div align="center">
                        <img src='<%# Eval("ThumbImage") %>' height="100" width="150" /></div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Modify %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <a href='/Admin/Views/Site/TwelveYearCycleOfAnimalEdit.aspx?Id=<%#Eval("TwelveYearCycleOfAnimalID")%>'>
                            <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                                id="UpdateImage" /></a>
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                            ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                            ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("TwelveYearCycleOfAnimalEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
</owc:OwGrid>
<owc:OwObjectDataSource ID="TwelveYearCycleOfAnimalOds" runat="server" EnableCaching="false"
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwTwelveYearCycleOfAnimalsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" SelectCountMethod="OwGetByDynamicCount" EnablePaging="true"
    TypeName="Micronet.OpenWeb.Com.BLL.OwTwelveYearCycleOfAnimalsBLL" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="countryID" Type="Int64" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
<owc:OwObjectDataSource ID="CountryOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwLocalitiesEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwLocalitiesBLL"
    UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:Parameter Name="parentID" Type="Int64" />
        <asp:Parameter Name="code" Type="String" />
        <asp:Parameter Name="isDeleted" Type="Boolean" />
        <asp:Parameter DbType="Guid" Name="creatingUser" />
        <asp:Parameter DbType="Guid" Name="editingUser" />
        <asp:Parameter DbType="Guid" Name="deletingUser" />
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="isEnabled" Type="Boolean" />
        <asp:Parameter Name="localityTypeID" Type="Int64" DefaultValue='<%$ Ow:Convert.ToInt64(OwEnum.LocalityTypes.Country)  %>' />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
